const defs = {
  "rpc": {
    "getHeader": {
      "alias": ["chain_getHead"],
      "description": "Retrieves the header for a specific block",
      "params": [
        {"name": "hash", "type": "BlockHash", "isCached": true, "isOptional": true}
      ],
      "type": "Header"
    },
    "getBlock": {
      "description": "Get header and body of a relay chain block",
      "params": [
        {"name": "hash", "type": "BlockHash", "isHistoric": true, "isOptional": true}
      ],
      "type": "SignedBlock"
    },
    "getBlockHash": {
      "description": "Get the block hash for a specific block",
      "params": [
        {"name": "blockNumber", "type": "BlockNumber", "isOptional": true}
      ],
      "type": "BlockHash"
    },
    "getFinalizedHead": {
      "alias": ["chain_getFinalisedHead"],
      "description": "Get hash of the last finalized block in the canon chain",
      "params": [],
      "type": "BlockHash"
    },
    "subscribeNewHeads": {
      "alias": ["chain_unsubscribeNewHeads", "subscribe_newHead", "unsubscribe_newHead"],
      "description": "Retrieves the best header via subscription",
      "params": [],
      "pubsub": ["newHead", "subscribeNewHead", "unsubscribeNewHead"],
      "type": "Header"
    },
    "subscribeFinalizedHeads": {
      "alias": ["chain_subscribeFinalisedHeads", "chain_unsubscribeFinalisedHeads"],
      "description": "Retrieves the best finalized header via subscription",
      "params": [],
      "pubsub": ["finalizedHead", "subscribeFinalizedHeads", "unsubscribeFinalizedHeads"],
      "type": "Header"
    },
    "subscribeAllHeads": {
      "description": "Retrieves the newest header via subscription",
      "params": [],
      "pubsub": ["allHead", "subscribeAllHeads", "unsubscribeAllHeads"],
      "type": "Header"
    }
  },
  "types": {"BlockHash": "Hash"}
};
